package com.chenl.provider.DEMOS.重复点击处理;

import com.alibaba.fastjson2.JSONObject;
import com.chenl.provider.DTO.UserInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/localLoclController")
public class LocalLockController {
    @LocalLock(key = "#userInfo.student",message = "testMessage")
    @PostMapping("/test")
    public  void test(@RequestBody UserInfo userInfo) {
        log.info(JSONObject.toJSONString(userInfo));
    }
}
